From 3beaa0a027612a62030b4d969a05b744c0388e2b Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sun, 23 Sep 2012 10:15:20 +0200 Subject: [PATCH] Follow-up Ifd700826 (60d119c), address a fixme in a re-enabled test. Make the "Date menu next month is 11 months ago" also work when the current month is december. Change-Id: Ie7b998bf962abbb3e2f789a3d8a9af8c52e7feaa --- tests/phpunit/includes/XmlTest.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/phpunit/includes/XmlTest.php b/tests/phpunit/includes/XmlTest.php index 562c6878cf..7f25f58147 100644 --- a/tests/phpunit/includes/XmlTest.php +++ b/tests/phpunit/includes/XmlTest.php @@ -37,7 +37,7 @@ class XmlTest extends MediaWikiTestCase { public function tearDown() { global $wgLang, $wgContLang; $wgLang = self::$oldLang; - + $wgContLang->setNamespaces( self::$oldNamespaces ); } @@ -162,10 +162,9 @@ class XmlTest extends MediaWikiTestCase { "Date menu year is the current one when not specified" ); - // @todo FIXME: next month can be in the next year - // test failing because it is now december + $wantedYear = $nextMonth == 1 ? $curYear : $prevYear; $this->assertEquals( - Xml::dateMenu( $prevYear, $nextMonth ), + Xml::dateMenu( $wantedYear, $nextMonth ), Xml::dateMenu( '', $nextMonth ), "Date menu next month is 11 months ago" ); -- 2.20.1